package com.fw.system.web.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fw.common.IdXD;
import com.fw.system.web.dao.TbNoticeMapper;
import com.fw.system.web.model.entity.TbNotice;
import com.fw.system.web.service.ITbNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

/**
 * <p>
 * 公告、炸弹护盾使用情况表 服务实现类
 * </p>
 *
 * @author ${author}
 * @since 2023-03-28
 */
@Service
public class TbNoticeServiceImpl extends ServiceImpl<TbNoticeMapper, TbNotice> implements ITbNoticeService {


    @Autowired
    private IdXD idXD;


    @Override
    public void addNoticeLog(TbNotice notice) {
        notice.setId(idXD.nextId());
        notice.setCreateTime(LocalDateTime.now()).insert();
    }
}
